﻿<!-- Content Header (Page header) -->
<section class="content-header">
    <h1>
        文章管理
        <small>Article Manage</small>
    </h1>
    <ol class="breadcrumb">
        <li><a href="/Home/Dashboard"><i class="fa fa-dashboard"></i> Home</a></li>
        <li class="active">文章管理</li>
    </ol>
</section>
<!-- Main content -->
<section class="content">
    <div class="row">
        <div class="col-xs-12">
            <div class="box">
                <div class="box-header">
                    <h3 class="box-title">Hover Data Table</h3>
                </div>
                <!-- /.box-header -->
                <div class="box-body">
                    <table id="DataTable" class="table table-bordered table-hover">
                        <thead>
                            <tr>
                                <th>标题</th>
                                <th>创建时间</th>
                                <th>标签</th>
                                <th>作者</th>
                                <th>创建时间</th>
                                <th>操作</th>
                            </tr>
                        </thead>
                        <tbody>
                            <tr v-for="item in mydata">
                                <td>{{item.Title}}</td>
                                <td>{{item.UpdateTime}}</td>
                                <td>{{item.Tags}}</td>
                                <td>{{item.Author}}</td>
                                <td>{{item.CreationTime}}</td>
                                <td>
                                    <a href="#" v-on:click="udelete(item.Id)">删除</a>
                                    <a href="#" v-on:click="updateu(item)">编辑</a>
                                </td>
                            </tr>
                        </tbody>
                        <tfoot>
                            <tr>
                                <th>标题</th>
                                <th>创建时间</th>
                                <th>标签</th>
                                <th>作者</th>
                                <th>创建时间</th>
                                <th>操作</th>
                            </tr>
                        </tfoot>
                    </table>
                </div>
                <!-- /.box-body -->
            </div>
        </div>
        <!-- /.col -->
    </div>
    <!-- /.row -->
</section>
<!-- /.content -->

@section scripts{
    
}
<script src="/bower_components/datatables.net/js/jquery.dataTables.min.js"></script>
<script src="/bower_components/datatables.net-bs/js/dataTables.bootstrap.min.js"></script>
<script>
        $(function () {
            $('#DataTable').DataTable({
                'paging': true,
                'lengthChange': false,
                'searching': false,
                'ordering': true,
                'info': true,
                'autoWidth': false
            })
            var data = null;
            var vm = new Vue({
                el: '#DataTable',
                data: {
                    mydata: data
                },
                methods: {
                    udelete: function (_id) //删除  
                    {
                    },
                    updateu: function (item) //更新  
                    {
                    }
                }
            });
        })
</script>
